3.477 \(\int \sec ^6(e+f x) (b (c \tan (e+f x))^n)^p \, dx\)

Optimal. Leaf size=99 \[ \frac {\tan ^5(e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (n p+5)}+\frac {2 \tan ^3(e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (n p+3)}+\frac {\tan (e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (n p+1)} \]

[Out]

tan(f*x+e)*(b*(c*tan(f*x+e))^n)^p/f/(n*p+1)+2*tan(f*x+e)^3*(b*(c*tan(f*x+e))^n)^p/f/(n*p+3)+tan(f*x+e)^5*(b*(c
*tan(f*x+e))^n)^p/f/(n*p+5)

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3659, 2607, 270} \[ \frac {\tan ^5(e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (n p+5)}+\frac {2 \tan ^3(e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (n p+3)}+\frac {\tan (e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (n p+1)} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^6*(b*(c*Tan[e + f*x])^n)^p,x]

[Out]

(Tan[e + f*x]*(b*(c*Tan[e + f*x])^n)^p)/(f*(1 + n*p)) + (2*Tan[e + f*x]^3*(b*(c*Tan[e + f*x])^n)^p)/(f*(3 + n*
p)) + (Tan[e + f*x]^5*(b*(c*Tan[e + f*x])^n)^p)/(f*(5 + n*p))

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 3659

Int[(u_.)*((b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> Dist[(b^IntPart[p]*(b*(c*Tan[e + f*x
])^n)^FracPart[p])/(c*Tan[e + f*x])^(n*FracPart[p]), Int[ActivateTrig[u]*(c*Tan[e + f*x])^(n*p), x], x] /; Fre
eQ[{b, c, e, f, n, p}, x] &&  !IntegerQ[p] &&  !IntegerQ[n] && (EqQ[u, 1] || MatchQ[u, ((d_.)*(trig_)[e + f*x]
)^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig]])

Rubi steps

\begin {align*} \int \sec ^6(e+f x) \left (b (c \tan (e+f x))^n\right )^p \, dx &=\left ((c \tan (e+f x))^{-n p} \left (b (c \tan (e+f x))^n\right )^p\right ) \int \sec ^6(e+f x) (c \tan (e+f x))^{n p} \, dx\\ &=\frac {\left ((c \tan (e+f x))^{-n p} \left (b (c \tan (e+f x))^n\right )^p\right ) \operatorname {Subst}\left (\int (c x)^{n p} \left (1+x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left ((c \tan (e+f x))^{-n p} \left (b (c \tan (e+f x))^n\right )^p\right ) \operatorname {Subst}\left (\int \left ((c x)^{n p}+\frac {2 (c x)^{2+n p}}{c^2}+\frac {(c x)^{4+n p}}{c^4}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\tan (e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (1+n p)}+\frac {2 \tan ^3(e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (3+n p)}+\frac {\tan ^5(e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (5+n p)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 2.18, size = 122, normalized size = 1.23 \[ \frac {\cot (e+f x) \left (b (c \tan (e+f x))^n\right )^p \left (\tan ^2(e+f x) \sec ^4(e+f x) \left (2 (n p+3) \cos (2 (e+f x))+\cos (4 (e+f x))+n^2 p^2+6 n p+8\right )+8 \left (-\tan ^2(e+f x)\right )^{\frac {1}{2} (1-n p)}\right )}{f (n p+1) (n p+3) (n p+5)} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^6*(b*(c*Tan[e + f*x])^n)^p,x]

[Out]

(Cot[e + f*x]*(b*(c*Tan[e + f*x])^n)^p*((8 + 6*n*p + n^2*p^2 + 2*(3 + n*p)*Cos[2*(e + f*x)] + Cos[4*(e + f*x)]
)*Sec[e + f*x]^4*Tan[e + f*x]^2 + 8*(-Tan[e + f*x]^2)^((1 - n*p)/2)))/(f*(1 + n*p)*(3 + n*p)*(5 + n*p))

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 107, normalized size = 1.08 \[ \frac {{\left (n^{2} p^{2} + 8 \, \cos \left (f x + e\right )^{4} + 4 \, {\left (n p + 1\right )} \cos \left (f x + e\right )^{2} + 4 \, n p + 3\right )} e^{\left (n p \log \left (\frac {c \sin \left (f x + e\right )}{\cos \left (f x + e\right )}\right ) + p \log \relax (b)\right )} \sin \left (f x + e\right )}{{\left (f n^{3} p^{3} + 9 \, f n^{2} p^{2} + 23 \, f n p + 15 \, f\right )} \cos \left (f x + e\right )^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^6*(b*(c*tan(f*x+e))^n)^p,x, algorithm="fricas")

[Out]

(n^2*p^2 + 8*cos(f*x + e)^4 + 4*(n*p + 1)*cos(f*x + e)^2 + 4*n*p + 3)*e^(n*p*log(c*sin(f*x + e)/cos(f*x + e))
+ p*log(b))*sin(f*x + e)/((f*n^3*p^3 + 9*f*n^2*p^2 + 23*f*n*p + 15*f)*cos(f*x + e)^5)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^6*(b*(c*tan(f*x+e))^n)^p,x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,x):;OUTPUT:Eval
uation time: 6.28Unable to divide, perhaps due to rounding error%%%{1,[0,1,4,0,0]%%%}+%%%{2,[0,1,2,2,0]%%%}+%%
%{1,[0,1,0,4,0]%%%} / %%%{1,[0,0,5,0,1]%%%} Error: Bad Argument Value

________________________________________________________________________________________

maple [F]  time = 2.18, size = 0, normalized size = 0.00 \[ \int \left (\sec ^{6}\left (f x +e \right )\right ) \left (b \left (c \tan \left (f x +e \right )\right )^{n}\right )^{p}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^6*(b*(c*tan(f*x+e))^n)^p,x)

[Out]

int(sec(f*x+e)^6*(b*(c*tan(f*x+e))^n)^p,x)

________________________________________________________________________________________

maxima [A]  time = 0.74, size = 106, normalized size = 1.07 \[ \frac {\frac {b^{p} c^{n p} {\left (\tan \left (f x + e\right )^{n}\right )}^{p} \tan \left (f x + e\right )^{5}}{n p + 5} + \frac {2 \, b^{p} c^{n p} {\left (\tan \left (f x + e\right )^{n}\right )}^{p} \tan \left (f x + e\right )^{3}}{n p + 3} + \frac {b^{p} c^{n p} {\left (\tan \left (f x + e\right )^{n}\right )}^{p} \tan \left (f x + e\right )}{n p + 1}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^6*(b*(c*tan(f*x+e))^n)^p,x, algorithm="maxima")

[Out]

(b^p*c^(n*p)*(tan(f*x + e)^n)^p*tan(f*x + e)^5/(n*p + 5) + 2*b^p*c^(n*p)*(tan(f*x + e)^n)^p*tan(f*x + e)^3/(n*
p + 3) + b^p*c^(n*p)*(tan(f*x + e)^n)^p*tan(f*x + e)/(n*p + 1))/f

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (b\,{\left (c\,\mathrm {tan}\left (e+f\,x\right )\right )}^n\right )}^p}{{\cos \left (e+f\,x\right )}^6} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*(c*tan(e + f*x))^n)^p/cos(e + f*x)^6,x)

[Out]

int((b*(c*tan(e + f*x))^n)^p/cos(e + f*x)^6, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (b \left (c \tan {\left (e + f x \right )}\right )^{n}\right )^{p} \sec ^{6}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**6*(b*(c*tan(f*x+e))**n)**p,x)

[Out]

Integral((b*(c*tan(e + f*x))**n)**p*sec(e + f*x)**6, x)

________________________________________________________________________________________